package edu.cicese.alz.reports;

import org.jfree.chart.axis.SymbolAxis;
import org.jfree.chart.renderer.LookupPaintScale;

import java.awt.Color;

/**
 * Created by: Eduardo Quintana Contreras
 * Date: 18/07/12
 * Time: 03:28 PM
 */
public class FrameAccelerometerBlock extends FrameBlock {

	public FrameAccelerometerBlock(
			int userID, long startTime,
			Color colorNoData, Color colorNoMovement, Color colorSedentary,
			Color colorLight, Color colorModerate, Color colorHard) {

		super(userID, startTime);

		title = "Activity Intensity - Subject: " + userID;

		paintScale = new LookupPaintScale(0.5, 6.5, colorNoData);
		paintScale.add(0.5, colorNoData);
		paintScale.add(1.5, colorNoMovement);
		paintScale.add(2.5, colorSedentary);
		paintScale.add(3.5, colorLight);
		paintScale.add(4.5, colorModerate);
		paintScale.add(5.5, colorHard);

		symbolAxis = new SymbolAxis(null, new String[]{"", "No Data", "No Movement", "Sedentary", "Light", "Moderate", "Hard"});
		symbolAxis.setRange(0.5, 6.5);
	}
}
